IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'SagaInsert')
	BEGIN
		DROP  Procedure  SagaInsert
	END

GO

CREATE Procedure SagaInsert
@TemplateStyle Int,
@Name nvarchar(250) = NULL,
@TagLine nvarchar(150) = NULL,
@Header ntext = Null,
@CurrentAffiars ntext = NULL,
@SagaSummary ntext = NULL,
@FormationStory ntext = NULL,
@FoundedMonth int = NULL,
@FoundedYear int = NULL,
@CurrentYear int = NULL



AS

INSERT INTO Saga
(
	TemplateStyle,
	Name,
	TagLine,
	Header,
	CurrentAffairs,	
	SagaSummary,
	FormationStory,
	FoundedMonth,
	FoundedYear,
	CurrentYear
)
VALUES
(
	@TemplateStyle ,
	@Name,
	@TagLine,
	@Header,
	@CurrentAffiars,
	@SagaSummary,
	@FormationStory,
	@FoundedMonth,
	@FoundedYear,
	@CurrentYear
)

DECLARE @Identity INT
SET @Identity = SCOPE_IDENTITY() 
SELECT @Identity